<?php
require 'ut.php';
include 'config.php';

try {

	$db = MySQL::connect($config['mysql_host'], $config['mysql_user'], $config['mysql_password'], $config['mysql_db']);
	$db = MySQL::getInstance();
	unset($config);

} catch (DatabaseException $e) {
	// Working with database went wrong
	@file_put_contents('db.log', date("-- r\n").$e->__toString()."\n", FILE_APPEND);
	if ( defined('DEBUG') ) {
		echo $e->__toString();
	}
}

